/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Minhdz
 */
@Entity
@Table(name = "Seminars", catalog = "prjSem4", schema = "dbo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Seminars.findAll", query = "SELECT s FROM Seminars s"),
    @NamedQuery(name = "Seminars.findBySeminarID", query = "SELECT s FROM Seminars s WHERE s.seminarID = :seminarID"),
    @NamedQuery(name = "Seminars.findBySeminarName", query = "SELECT s FROM Seminars s WHERE s.seminarName = :seminarName"),
    @NamedQuery(name = "Seminars.findByPrice", query = "SELECT s FROM Seminars s WHERE s.price = :price"),
    @NamedQuery(name = "Seminars.findByNumberSheet", query = "SELECT s FROM Seminars s WHERE s.numberSheet = :numberSheet"),
    @NamedQuery(name = "Seminars.findBySeminarDesc", query = "SELECT s FROM Seminars s WHERE s.seminarDesc = :seminarDesc")})
public class Seminars implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "SeminarID")
    private Integer seminarID;
    @Size(max = 100)
    @Column(name = "SeminarName")
    private String seminarName;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "Price")
    private Double price;
    @Column(name = "NumberSheet")
    private Integer numberSheet;
    @Size(max = 1073741823)
    @Column(name = "SeminarDesc")
    private String seminarDesc;
    @JoinColumn(name = "SeminarTypeID", referencedColumnName = "SeminarTypeID")
    @ManyToOne
    private CategoriesSeminar seminarTypeID;

    public Seminars() {
    }

    public Seminars(Integer seminarID) {
        this.seminarID = seminarID;
    }

    public Integer getSeminarID() {
        return seminarID;
    }

    public void setSeminarID(Integer seminarID) {
        this.seminarID = seminarID;
    }

    public String getSeminarName() {
        return seminarName;
    }

    public void setSeminarName(String seminarName) {
        this.seminarName = seminarName;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getNumberSheet() {
        return numberSheet;
    }

    public void setNumberSheet(Integer numberSheet) {
        this.numberSheet = numberSheet;
    }

    public String getSeminarDesc() {
        return seminarDesc;
    }

    public void setSeminarDesc(String seminarDesc) {
        this.seminarDesc = seminarDesc;
    }

    public CategoriesSeminar getSeminarTypeID() {
        return seminarTypeID;
    }

    public void setSeminarTypeID(CategoriesSeminar seminarTypeID) {
        this.seminarTypeID = seminarTypeID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (seminarID != null ? seminarID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Seminars)) {
            return false;
        }
        Seminars other = (Seminars) object;
        if ((this.seminarID == null && other.seminarID != null) || (this.seminarID != null && !this.seminarID.equals(other.seminarID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Seminars[ seminarID=" + seminarID + " ]";
    }
    
}
